import Cookies from "js-cookie";
// 变量
const tokenKey = "tokenAdmin";
const userNameKey = "username";

// 获取token
export function getToken() {
    return Cookies.get(tokenKey);
}

// 写入token
export function setToken(value) {
    return Cookies.set(tokenKey, value);
}

// 删除token
export function removeToken() {
    return Cookies.remove(tokenKey);
}

// 写入username
export function setUsername(value) {
    Cookies.set(userNameKey, value);
}

// 获取userName
export function getUsername() {
    Cookies.get(userNameKey);
}

// 删除 userName
export function removeUsername() {
    Cookies.remove(userNameKey);
}